<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>注册页面</title>
	<link rel="stylesheet" href="./Public/Home/style/css/reg.css">
	<link rel="stylesheet" href="./Public/Home/style/images/login/font.css">
	<script src="Public/Home/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="./Public/Home/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>	
	<link rel="stylesheet" href="./Public/Home/hdjs/hdjs.css">
	<script>
		$(function(){
			$("#ucount").blur(function(){
				var count=$(this).val();
				// alert(count);
				$.ajax({
					type:'post',
					url:'<?php echo U("Login/yanzheng")?>',
					data:{c:count},
					dataType:'json',
					success:function(e){
						if(e==1){
							var html='<span class="count" style="color: red;font-size: 10px;display: block;line-height: 34px;">用户名已存在</span>';
							$(".count").html(html);
						}
						if(e==0){
							var html='<span class="count" style="color: green;font-size: 10px;display: block;line-height: 34px;">恭喜，可以注册</span>';
							$(".count").html(html);
						}
					}
				})

			});

			$("#code").blur(function(){
				var code=$(this).val();
				// alert(count);
				$.ajax({
					type:'post',
					url:'<?php echo U("Login/yancode")?>',
					data:{c:code},
					dataType:'json',
					success:function(e){
						if(e==0){
							var html='<span class="count" style="color: red;font-size: 10px;display: block;line-height: 34px;">验证码错误</span>';
							$(".code").html(html);
						}
						if(e==1){
							var html='<span class="count" style="color: green;font-size: 10px;display: block;line-height: 34px;">验证码正确</span>';
							$(".code").html(html);
						}
					}
				})

			});

			
		})
	</script>
</head>
<body>
	<div id="top">
		<div class="top_l">
			<a href="<?php echo U('Index/index')?>" title="返回首页"><img src="./Public/Home/style/images/login/logo.png" alt=""></a>
		</div>
	</div>
	<div id="login">
		<div class="login">
			<div class="login_l">
				<img src="./Public/Home/style/images/login/mls17.png" alt="">
			</div>
			<div class="login_r">
				<div class="login_rt">
					<div class="login_rtl">
						<h3>360商城</h3>
					</div>
					<div class="login_rtr">
						<a href="<?php echo U('Login/login')?>">登录</a>
					</div>
					
				</div>
				<form onsubmit="return hd_submit(this,'<?php echo U('reg')?>','<?php echo U('login')?>')">
				<div class="login_rt1">
					<!-- <div class="login_rt1l" style="background: url('./style/images/login/mls12.png') -75px 0px;;"></div> -->
						<input id="ucount" type="text" name="ucount" placeholder="用户名">
						<span class="count"></span>
				</div>
				<!-- <div class="login_rt1">
						<input type="text" placeholder="昵称">
				</div> -->
				<div class="login_rt1">
					<!-- <div class="login_rt1l" style="background: url('./style/images/login/mls12.png') -25px 0px;"></div> -->
						<input type="text" name="upassword" placeholder="密码">
						<!-- <span class="count"></span> -->
				</div>
				<div class="login_rt1">
					<!-- <div class="login_rt1l" style="background: url('./style/images/login/mls12.png') -25px 0px;"></div> -->
						<input type="text" name="confirm" placeholder="确认密码">
						<input type="hidden" name="hidden" value="1">
						<!-- <span class="count"></span> -->
				</div>
				<!-- <div class="login_rc">
					<span>请点击下方图片旋转至正确位置，进行验证!</span>
				</div> -->
				<div class="login_rt1" style="width:200px;float: left;">
					<input type="text" id="code" class="ucount" placeholder="验证码" name="code" style="width:193px;">
					<span class="code"></span>
					
				</div>
				<img id="change" style="margin-left:5px;" src="<?php echo U('Login/code')?>&ran=1" alt=""><a style="font-size: 14px;" href="javascript:;" onclick="a()">看不清换一张</a>
				<div class="login_rc2">
					<input type="submit" value="立即注册">
					 <!-- <button type="submit">注册</button> -->
				</div>
				<script>
					function a(){
						var b=document.getElementById('change');
						b.src="<?php echo U('Login/code')?>&ran="+Math.random();
					}
				</script>
				<!-- <div class="login_rc3">
					<div class="login_rc3l">
						<input type="checkbox" >
						<span>同意</span>
					</div>
				</div> -->
				</form>
			</div>
			
		</div>
	</div>
</body>
</html>